All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.util.StringHandle
java.lang.Object
|
+----quicktime.QTObject
|
+----quicktime.util.QTHandleRef
|
+----quicktime.util.StringHandle
- public class StringHandle
- extends QTHandleRef
- implements QuickTimeLib
This class is used to store 7bit ASCII value strings
-
kCStringFormat
-
-
kPStringFormat
-
-
StringHandle(String, int)
- Construct a handle from a java String.
-
fromCodecName(CodecName)
- Get the name of the compressor component.
-
fromJavaString(String)
- Sets the String found in the handle to the java.lang.String characters.
-
getFormat()
- Returns true if the string stored in the handle is a C String, or false
if it is a PString
-
getStringLength()
- Returns the length of the String that is stored in the StringHandle.
-
toJavaString()
- Returns the String found in the Handle as a java.lang.String
-
toString()
- Returns the String found in the Handle as a java.lang.String
kCStringFormat
public static final int kCStringFormat
kPStringFormat
public static final int kPStringFormat
StringHandle
public StringHandle(String str,
int format) throws QTException
- Construct a handle from a java String. The string will only be stored as 7bit ASCII values
- the full unicode specification of the Java String is lost in this conversion.
You must supply information about how this String is to be formatted.
- Parameters:
- str - the Java string to store in the handle
- format - if kCStringFormat the string is formatted as a C string with a '\0' termination
if kPStringFormat then the string is formatted as a PString with a count byte inserted at the start.
fromCodecName
public static StringHandle fromCodecName(CodecName cn)
- Get the name of the compressor component.
- Returns:
- the name.
- See Also:
- getName
getStringLength
public int getStringLength()
- Returns the length of the String that is stored in the StringHandle.
- Returns:
- the number of characters in this String
getFormat
public int getFormat()
- Returns true if the string stored in the handle is a C String, or false
if it is a PString
toJavaString
public String toJavaString() throws UtilException
- Returns the String found in the Handle as a java.lang.String
- Returns:
- java.lang.String representation
fromJavaString
public void fromJavaString(String str) throws UtilException
- Sets the String found in the handle to the java.lang.String characters.
This will NOT grow the handle so that handle must be big enough to hold the new string
- Parameters:
- str - the characters that the StringHandle will be set to
toString
public String toString()
- Returns the String found in the Handle as a java.lang.String
- Returns:
- java.lang.String representation
- Overrides:
- toString in class QTHandleRef
All Packages Class Hierarchy This Package Previous Next Index